FROM 99fu.cn:5000/ubuntu:latest

# last modified at 2016-11-08
MAINTAINER 99fu <958177388@qq.com>

RUN sed -i "s/archive\.ubuntu\.com/mirrors\.163\.com/g" /etc/apt/sources.list && \
  apt-get update

ENV PATH /usr/local/program/jdk/bin:$PATH
ENV JAVA_HOME /usr/local/program/jdk

# first you must download the jdk from internet into current directory, then rename it to *.jdk.tar.gz
COPY jdk-7u79-linux-x64.tar.gz jdk.tar.gz

# Install jdk1.8
RUN \
  tar -xvf jdk*.tar.gz &&\
  mkdir -p /usr/local/program && \
  mv jdk*/ /usr/local/program/jdk

CMD ["/bin/bash"]

